﻿using OperationPlugins.WebAppClient;
using System;
using System.Collections.Generic;
using System.Web.Mvc;
using Tester.Shared;

namespace Tester.Controllers
{
    public class TestPage1Controller : Controller
    {
        // GET: TestPage1
        public ActionResult Index()
        {
            return View();
        }

        [HttpPost]
        public ActionResult Test()
        {
            var l = new List<Person>
            {
                new Person {Id = 1, Name = "Batman", BirthDate = new DateTime(1945, 4, 10), Salary = 1000m},
                new Person {Id = 2, Name = "Zorro", BirthDate = new DateTime(1899, 12, 31), Salary = 0m},
                new Person {Id = 3, Name = "Superman", BirthDate = new DateTime(1940, 1, 1), Salary = 50000.95m}
            };

            WebApp.Validate(
                "http://localhost:2722/BlackBox/Feed",
                l,
                "Person",
                "admin",
                "admin",
                "Tester",
                null,
                null);

            return RedirectToAction("Index");
        }

    }



}